<!-- /* Description for file.
 * 候选人管理
 *
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/candidates
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0709
 * @lastmodified  张海杰2011年0709
 */-->
 
 <script language="javascript">
var delurl="<?php echo $deleteurl; ?>";
</script>
<script language="javascript">
var editurl="<?php echo $editurl; ?>";
</script>
<script language="javascript">
var addurl="<?php echo $addurl; ?>";
</script>
<script language="javascript">
var data=<?php echo $data; ?>;
</script>
<script language="javascript">
var disbutton=<?php echo $javascript->object($disbutton);?>;
</script>
<script language="javascript">
var title2="<?php echo $title2; ?>";
</script>
<?php echo $javascript->link('jquery-1.4.2');?>
<script language="javascript">
function button(com,grid,url)  
{  
	var ids=$("#flex").getCheckedRows();
	if(com=="delete")
	{
		var pids="";
		if(ids.length==0)
		{
			alert("请选择你要删除的项");
			return;
		}
		for(i=0;i<ids.length;i++)
        {
        	pids=pids+ids[i]+"/";
        }
		$.ajax({
            type: "post",
            url: url,
            data: {id:pids},
            dataType:"json",
            success: function(data) {
            $(".clearckeck").trigger("click");
			$(".pReload").trigger("click");
			$(".notice").html(data.message); 
			},
            error: function(data) {
				$(".clearckeck").trigger("click");
				$(".pReload").trigger("click");
				$(".notice").html('data.message');
			}
        });
	}
	else if(com=="add")
	{
		window.open(url,'mainFrame2');
	}
	else if(com=="edit")
	{
		if(ids.length!=1)
		{
			alert("请选择一个选项");
		}
		else
		{
			var seid=ids[0];
			var eurl=url+"?id="+seid;
			window.open(eurl,'mainFrame2');
		}
	}
	else
	{
		var pix=com.substring(0,2);
		switch (pix)
		{
			case "aj":
				var pids="";
				if(ids.length==0&&com.substring(0,3)!="ajj")
				{
					alert("请选择选项");
					return;
				}
				for(i=0;i<ids.length;i++)
		        {
		        	pids=pids+ids[i]+"/";
		        }
				if(!confirm("确定删除?"))
				{
					return;
				}
				var param= [{name:"id",value:pids}];
				  $.ajax({
					  type: 'POST',
					   url: url,
					   async: false,
					   data: param,
					   dataType:"json",
					   success: function(xml)
					   {
					  		$(".clearckeck").trigger("click");
							$(".pReload").trigger("click");
					   },
				       error:function(xml)
				       {
						   $(".clearckeck").trigger("click");
							$(".pReload").trigger("click");
					   }
		        });
				window.parent.I11.location.reload();
				break;
			case "up":
				if(ids.length<1)
				{
					alert("请选择");
				}
				else
				{
					var seid="";
					for(i=0;i<ids.length;i++)
					{
						seid=""+seid+ids[i]+"a";
					}
					var eurl=url+"?id="+seid;
					window.open(eurl,'mainFrame2');
				}
				break;
			default:
				window.open(url,'mainFrame2');
		}
	}
}
</script>
<script type="text/javascript">
var b=[{
	name:'add',
	displayname : '添加',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/add.png',
	bclass : 'add',
	onpress : button,
	display:disbutton.add,
	url:addurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.del
},
{
	name:'delete',
	displayname : '删除',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/delete.png',
	bclass : 'delete',
	onpress : button,
	display:disbutton.del,
	url:delurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.del
},
{
	name:'edit',
	displayname : '更新',
	tp : '<?php echo ROOT_WEB_PATH; ?>/app/webroot/css/images/icons/edit.png',
	bclass : 'add',
	onpress : button,
	display:disbutton.edit,
	url:editurl
},
{
	// 设置分割线
	separator : true,
	display:disbutton.edit
}];
</script>
<script type="text/javascript">
var ob=<?php echo $ob;?>;
if(ob.length==0)
{
	
}
else
{
	for(i=0;i<ob.length;i++)
	{
		var l=b.length;
		b[l]=ob[i];
	}
}
</script>
<?php
	echo $html->css('flexigrid');
	echo $html->css('start/jquery-ui-1.8.2.custom');
	
	//echo $javascript->link('jquery');
	echo $javascript->link('flexigrid/flexigrid'); 
	echo $javascript->link('candidatemanage');
	//echo $javascript->link('DatePicker/WdatePicker');
	echo $javascript->link('jquery-ui-1.8.2.custom.min');
	echo $html->css ( 'style' );
?>
<script type="text/javascript">
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );
	});
</script>

<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Projectmanagements');//一级目录
										   echo '>';echo __('Projectmanagements');//二级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('History Candidate Management',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->

<!--                                          按钮区域-->
<script type="text/javascript">
$(function(){
		$("#bt_6").click(function () {$(".bt6").click();});
		$("#bt_8").click(function () {$(".bt8").click();});
		$("#bt_10").click(function () {$(".bt10").click();});
		$("#bt_12").click(function () {$(".bt12").click();});
		$("#bt_14").click(function () {$(".bt14").click();});
		$("#bt_16").click(function () {$(".bt16").click();});
		$("#bt_18").click(function () {$(".bt18").click();});
		$("#bt_20").click(function () {$(".bt20").click();});
		$("#bt_22").click(function () {$(".bt22").click();});
		$("#bt_24").click(function () {$(".bt24").click();});
		$("#bt_26").click(function () {$(".bt26").click();});
		});
</script>
<div class="buttonbg">
<a style="width:72px;" id="bt_6">从简历库添加</a>   <!-- 一个中文字12px宽 a的宽根据按钮内容设 -->
<a style="width:72px;" id="bt_8">从寻访库添加</a>
<a style="width:24px;" id="bt_10">删除</a>
<a style="width:48px;" id="bt_12">寻访list</a>
<a style="width:48px;" id="bt_14">目标公司</a>
<a style="width:58px;" id="bt_16">Cold Call</a>
<a style="width:48px;" id="bt_18">List上传</a>
<a style="width:48px;" id="bt_20">简历入库</a>   
<a style="width:48px;" id="bt_22">编辑项目</a>
<a style="width:72px;" id="bt_24">加入其他寻访</a>
<a style="width:58px;" id="bt_26">导出Excel</a>
</div>
<!--                                         按钮区域--> 

<!--<form class='searchform'>
简历ID:<input type="text" name="seq" class='sitems'/><br>
姓名:<input type="text" name="name" class='sitems'/><br>
户籍:<input type="text" name="ageMax" class='sitems'/>至：<input type="text" name="ageMin" class='sitems'/><br>
性别:<input type="text" name="sex" class='sitems'/><br>
学历:<input type="text" name="seq" class='sitems'/><br>
工作年限:<input type="text" name="ageMax" class='sitems'/>至：<input type="text" name="ageMin" class='sitems'/><br>
入库人:<input type="text" name="seq" class='sitems'/><br>
证书:<input type="text" name="seq" class='sitems'/><br>
简历等级:<input type="text" name="seq" class='sitems'/><br>
入库时间:<input type="text" name="ageMax" class='sitems'/>至：<input type="text" name="ageMin" class='sitems'/><br>
修改人:<input type="text" name="seq" class='sitems'/><br>
居住地:<input type="text" name="seq" class='sitems'/><br>
应聘岗位:<input type="text" name="seq" class='sitems'/><br>
修改时间:<input type="text" name="seq" class='sitems'/>至：<input type="text" name="ageMin" class='sitems'/><br>
面试情况：
<input type="submit" value="搜索"/>
</form>
-->
<!--                                                                           查询区域-->
<!--                                                                           查询区域-->
<!--     
                                                                      表格-->
<div class="tabflex">
<table cellSpacing=0 cellPadding=5>
<tr>
	<td>
		所属项目：
	</td>
	<td>
	<?php echo "<a href='<?php echo ROOT_WEB_PATH; ?>/projectmanagements/getID/$projectmanagementid' target='_blank'>".$project[0]['Projectmanagement']['projectCompany']."</a>";?>
	</td>
	<td style="margin-left:5px;">
	<?php echo "<a href='<?php echo ROOT_WEB_PATH; ?>/projectmanagements/getPosition/$projectmanagementid'  target='_blank'>".$project[0]['Projectmanagement']['projectCompanyPosition']."</a>";?>
	</td>
	<td>
	<?php echo $project[0]['Projectmanagement']['projectCode'];?>
	</td>
	<td>
寻访状态：
</td>
<td  style="vertical-align:center;">
<?php 
echo "<form class='searchform'>";		
echo "<select name='visitorstate' class='sitems' id='visitorstate'>";
			foreach ($op as $k=>$v)
			{
				echo "<option value='$v'>$k</option>";
			}
			echo "</select>";
echo "</form>";
?>
</td>
</tr>
</table>
</div>
<?php echo $form->hidden('id',array('default'=>"$projectmanagementid",'id'=>'id'));?>                                                                     
<div class="tabflex">
<table id="flex" style="display: none"></table><br></br>
</div>
<!--                                                                           表格-->



